import request from '@/utils/request';

export function login(data) {
  return request({
    url: '/UserRest/login',
    method: 'post',
    data
  });
}

export function getInfo(token) {
  return request({
    url: '/UserRest/getuserdata',
    method: 'post',
    params: { token },
    data: {}
  });
}

export function logout() {
  return request({
    url: '/UserRest/logout',
    method: 'post'
  });
}

export function register(data) {
  return request({
    url: '/UserRest/register',
    method: 'post',
    data
  });
}

export function forgetPassword(data) {
  return request({
    url: '/UserRest/forget',
    method: 'post',
    data
  });
}
export function modifyPassword(data) {
  return request({
    url: '/UserRest/update',
    method: 'post',
    data
  });
}
// 诚信认证
export function authCredit(data) {
  return request({
    url: '/UserRest/addQualifications',
    method: 'post',
    data
  });
}
// 查看诚信认证
export function getAuthCredit(data) {
  return request({
    url: '/UserRest/getQualifications',
    method: 'post',
    data
  });
}
// 品牌认证
export function authBrand(data) {
  return request({
    url: '/UserRest/addmerchantbrand',
    method: 'post',
    data
  });
}
// 查看品牌认证
export function getAuthBrand(data) {
  return request({
    url: '/UserRest/getmerchantbrand',
    method: 'post',
    data
  });
}
